package ru.papergames.battleserver.model.battle;

import java.awt.*;

/**
 * @author Alexander Troshanin
 */
public enum BallColor {

    COLOR_01(1),
    COLOR_02(2),
    COLOR_03(3),
    COLOR_04(4),
    COLOR_05(5),
    COLOR_06(6),
    COLOR_07(7),
    COLOR_08(8),
    COLOR_09(9),
    COLOR_10(10),
    ;

    private int id;

    BallColor(int id) {
        this.id = id;
    }

    public int getId() {
        return id;
    }

    public static BallColor getBallColorById(int id) {
        for (BallColor ballColor : BallColor.values()) {
            if (ballColor.id == id) {
                return ballColor;
            }
        }

        return COLOR_10;
    }

}
